From 29a6674cb535a8220052cda84dda9e4b26d0f34c Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 19 Apr 2025 19:36:54 +0100 Subject: [PATCH] modemmanager: backport commit fixing crash with Fibocom mtk-7xx modems Backport commit https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/046b79a6766b6384db9cd56a9af5d148787bafe4 See also https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975 Signed-off-by: Daniel Golle --- net/modemmanager/Makefile | 2 +- ...on-t-assume-parent-implements-the-fi.patch | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile index 0789f4a315..d6c5d1917e 100644 --- a/net/modemmanager/Makefile +++ b/net/modemmanager/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_VERSION:=1.24.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git diff --git a/net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch b/net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch new file mode 100644 index 0000000000..b440405ffc --- /dev/null +++ b/net/modemmanager/patches/0001-shared-fibocom-don-t-assume-parent-implements-the-fi.patch @@ -0,0 +1,28 @@ +From 046b79a6766b6384db9cd56a9af5d148787bafe4 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Sat, 12 Apr 2025 23:56:13 -0500 +Subject: [PATCH] shared-fibocom: don't assume parent implements the firmware + interface + +MMBroadbandModemMbimMtkFibocom doesn't, so don't assert it. + +Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/975 + +Signed-off-by: Dan Williams +--- + src/plugins/fibocom/mm-shared-fibocom.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/plugins/fibocom/mm-shared-fibocom.c ++++ b/src/plugins/fibocom/mm-shared-fibocom.c +@@ -75,8 +75,8 @@ get_private (MMSharedFibocom *self) + priv->class_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_class (self); + + /* Setup firmware interface of parent class */ +- g_assert (MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface); +- priv->iface_modem_firmware_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface (self); ++ if (MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface) ++ priv->iface_modem_firmware_parent = MM_SHARED_FIBOCOM_GET_IFACE (self)->peek_parent_firmware_interface (self); + + g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free); + } -- 2.30.2